package com.tensquare.mq.custom;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
//监听指定队列的消息
@RabbitListener(queues = "www")
public class Customer2 {

    @RabbitHandler
    public void showMessage(String message) {
        System.err.println("直接模式接收到消息：" + message);
    }
}
